package xin.marcher.wind.process.controller.admin;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xin.marcher.framework.common.web.response.BaseResult;
import xin.marcher.wind.process.domain.dto.BizConfigListDTO;
import xin.marcher.wind.process.domain.request.BizConfigQuery;
import xin.marcher.wind.process.service.BizConfigService;

import javax.annotation.Resource;
import java.util.List;

/**
 * 业务配置 前端控制器
 */
@RestController
@RequestMapping("/biz-config")
public class BizConfigController {

    @Resource
    private BizConfigService bizConfigService;

    /**
     * 业务配置列表查询
     * @param query 查询请求
     * @return 响应
     */
    @PostMapping("/list")
    public BaseResult<List<BizConfigListDTO>> list(@RequestBody BizConfigQuery query) {
        return BaseResult.success(bizConfigService.list(query));
    }

}
